<?php
 include 'cls_general_data.php';
 class cls_connection{
 var $conection;
 var $SERVER;
 var $USER;
 var $PASSWORD;
 var $DATA_BASE;
 var $general_data;

    function cls_connection(){
      $this->general_data=new cls_general_data();
      $this->SERVER=$this->general_data->SERVER;
      $this->USER=$this->general_data->USER;
      $this->PASSWORD=$this->general_data->PASSWORD;
      $this->DATA_BASE=$this->general_data->DATA_BASE;
    }
	
   function open_connection(){
     $this->connection=mysql_connect($this->SERVER,$this->USER,$this->PASSWORD,$this->DATA_BASE);
      if($this->connection){
        mysql_select_db($this->DATA_BASE);
        return 1;
	 }
     else 
	 {
	 return 0;
	 }
  }
  
  function close_connection(){
  mysql_close($this->connection);
  }
}